package com.naiterui.ehp.bs.emr.entity.mongo;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.naiterui.ehp.bs.emr.utils.enums.DiseaseCycle;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 患者病情描述
 *
 * @author lichaopi
 * @since 1.0.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Document(collection = "patient_disease")
public class PatientDisease implements Serializable {

    private static final long serialVersionUID = 8316726832153669609L;
    @Id
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String id;

    /**患者ID*/
    private Long patientId;
    /**
     * 就诊人id
     */
    private Long inquirerId;
    /**
     * 就诊人与患者关系：参考InquirerRelationEnum，只做记录，实际已就诊人表为准
     */
    private Integer relation;
    /**患者姓名*/
    private String patientName;
    /**患者年龄*/
    private Integer patientAge;
    /**患者年龄单位（天）*/
    private String patientAgeUnit;
    /**
     * 显示年龄
     */
    private String patientAgeStr;
    /**患者性别*/
    private Integer patientGender;
    /**医生ID*/
    private Long doctorId;
    /**医生名*/
    private String offlineDoctor;
    /**医院名*/
    private String offlineHospital;
    /**科室名称*/
    private String offlineDepartment;
    /**线下诊断*/
    private String offlineDiagnosis;
    /**
     * 线下病例或者处方图片
     */
    private List<String> offlineERImgs;
    /**
     * 线下诊断图片
     */
    private List<String> offlineDiagnosisImgs;

    /**
     * 线下病例/处方pdf文件
     */
    private List<UploadFile> offlineERPdfs;

    /**
     * 病情描述信息
     */
//    @ApiModelProperty(value = "病情主诉")
    private String description;
//    @ApiModelProperty(value = "患病时间")
    private DiseaseCycle diseaseCycle;
//    @ApiModelProperty(value = "病情描述图片")
    private List<String> descriptionImgs;

//    @ApiModelProperty(value = "当前服用的药物描述")
    private String drugs;
//    @ApiModelProperty(value = "处方图片或药盒图片")
    private List<String> drugsImgs;

    /**过敏记录描述*/
    private String allergy;
    /**过往病史描述*/
    private String pastHistory;

    /**
     * 冗余 紧急联系人姓名
     */
    private String contactName;
    /**
     * 冗余 紧急联系人电话
     */
    private String contactPhone;

    /**
     * 资料丢失标识(0，否；1，是)
     */
    private Integer dataLossTag;

    /**
     * 线下是否就诊
     */
    private Integer offlineSeeDoctor;

    private SessionInfo sessionInfo;

    @JsonInclude(JsonInclude.Include.NON_DEFAULT)
    private Date createAt;
    @JsonInclude(JsonInclude.Include.NON_DEFAULT)
    private String createBy;
    @JsonInclude(JsonInclude.Include.NON_DEFAULT)
    private Date changeAt;
    @JsonInclude(JsonInclude.Include.NON_DEFAULT)
    private String changeBy;
}
